using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace cs2335.CCT
{
    interface ICCTForm
    {
        /// <summary>
        /// Add a component to the CCTForm
        /// </summary>
        /// <param name="comp"> A Component</param>
        void Add(IComponent comp);
    }

    interface IProgressBar
    {
        /// <summary>
        /// Gets or sets the minimum value of the range 
        /// </summary>
        int Minimum
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the maximum value of the range 
        /// </summary>
        int Maximum
        {
            get;
            set;
        }


        /// <summary>
        /// Gets or sets the amount by which a call to
        /// the PerformStep method increases the current position
        /// of the progress bar.
        /// </summary>
        int Step
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the current position of the progress bar.
        /// </summary>
        int Value
        {
            get;
            set;
        }


        /// <summary>
        /// Advances the current position of the progress bar by 
        /// the amount of the Step property.
        /// </summary>
        void PerformStep();
    }

    interface IDomainUpDown
    {
        /// <summary>
        /// A collection of objects assigned to the up-down control.
        /// </summary>
        ArrayList Items {get;}


        /// <summary>
        /// Gets or sets a value indicating whether the item collection
        /// is sorted.
        /// </summary>
        bool Sorted
        {
            get;
            set;
        }


        /// <summary>
        /// The selected item based on the SelectedIndex value. The
        /// default value is a null.
        /// </summary>
        object SelectedItem 
        { 
          get;
          set;
        }


        /// <summary>
        /// Gets or sets the index value of the selected item.
        /// </summary>
        int SelectedIndex
        {
            get;
            set;
        }
    }

    interface ITextBox
    {
        /**
         * 
         * Notice: For this class you must have a cursar
         *   that can be moved by using the arrow keys
         *   and that cursar should disapear when the 
         *   textbox looses focus
         * 
         * */
        


        /// <summary>
        /// The number of characters that can be entered
        /// </summary>
        int MaxLength { get; set;}
    }



    interface IListSelect
    {
        /// <summary>
        /// A collection of objects assigned to the up-down control.
        /// </summary>
        ArrayList Items { get;}

        /// <summary>
        /// Gets or sets a value indicating whether the vertical
        /// scroll bar is shown at all times. 
        /// </summary>
        bool ScrollAlwaysVisable
        {
            get;
            set;
        }

        /// <summary>
        /// The zero-based index of the first visible item
        /// </summary>
        int TopIndex
        {
            get;
            set;
        }


        /// <summary>
        /// Selects or clears the selection for the specified
        /// item in a ListBox
        /// </summary>
        /// <param name="index">
        /// The zero-based index of the
        /// item in a ListBox to select or clear the selection for
        /// </param>
        /// <param name="value">rue to select the specified item;
        /// otherwise, false
        /// </param>
        void SetSelected(int index, bool value);
    }

    interface ITreeView
    {
        /// <summary>
        /// The collection of TreeNode objects that appear in the tree
        /// </summary>
        ITreeNodeCollection Nodes { get;}

	/// <summary>
	///  indicates whether the tree view
	///    displays scroll bars when they are needed.
	/// </summary>
	bool Scrollable { get; set; }

	/// <summary>
	///   The TreeNode that is currently selected
	/// </summary>
	ITreeNode SelectedNode { get; set; }
    }

    interface ITreeNodeCollection
    {
	/// <summary>
        /// Creates an instance of TreeNode
	/// Set's the TreeNode's text to nodeText
	/// Adds the TreeNode to the collection
        /// </summary>
        /// <param name="nodeText">
        /// The label text for the new TreeNode
        /// </param>
	ITreeNode Add(string nodeText);

	/// <summary>
	/// Removes the specified TreeNode from the collection
	/// </summary>
	/// <param name="node">
        /// The node to be removed from the collection
        /// </param>
	void Remove(ITreeNode node);

    /// <summary>
    /// Gets the List of nodes
    /// </summary>
    List<ITreeNode> List
    {
        get;
    }

    }

    interface ITreeNode
    {

        bool Expanded
        {
            get;
            set;
        }

	/// <summary>
        /// The text displayed in the label of the TreeNode
        /// </summary>
	string Text { get; set; }

	/// <summary>
        /// The TreeNode's child TreeNodes
        /// </summary>
        ITreeNodeCollection Nodes { get;}
    }
}
